package com.yoso.controller.http;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author shizejin
 * @date 2022/1/17
 * @description:
 */
@Slf4j
@RestController
public class HttpController {
    @RequestMapping("/http")
    public String get(HttpServletRequest httpServletRequest){
        String uri = httpServletRequest.getRequestURI();
        StringBuffer requestURL = httpServletRequest.getRequestURL();
        String url = requestURL.toString();
        System.out.println("uri = " + uri);
        System.out.println("url = " + url);
        return "success";
    }
}
